<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Page</title>
    <link rel="stylesheet" href="style/common.css"/>
    <link rel="stylesheet" href="style/book.css"/>
</head>
<body>

<!--start-->
<div class="techbook commendatory">
    <div class="page"><!--未调用插件-->
        <div>
            <a class="prev disabled">上一页</a><a class="curr">1</a><a>2</a><span>...</span><a>3</a><a>4</a><a>5</a><a class="next">下一页</a>
        </div>
    </div>
    <div class="page">
        <div>
            <a class="prev disabled">上一页</a><a class="curr">1</a><a>2</a><span>...</span><a>3</a><a>4</a><a>5</a><a class="next">下一页</a>
        </div>
    </div>
    <!--body-->
    <div class="body">
        <div class="wrap">
            <div class="page" id="commendatoryPage"><!--插件生成--></div>
        </div>
    </div>
    <!--body End-->


</div>
<!--End-->
<script src="script/jquery.js"></script>
<script src="script/plug.js"></script>
<script src="script/common.js"></script>
<script>
    $(function(){
        //page
        $('#commendatoryPage').page({
            num:10,
            callback: function (idx,redraw) {
                console.log('Click idx:',idx);
                $.ajax({
                    url:'data.json',
                    success: function () {
                        var newNum=Math.random()*20|0+5;
                        console.log('newNum:',newNum);
                        redraw(newNum);
                    }
                });
            }
        })
    });
</script>
</body>
</html>